<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Parentid')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-parentid" data-rule="required" class="form-control" name="row[parentid]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-content" data-rule="required" class="form-control" name="row[content]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Locked')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-locked" class="form-control" name="row[locked]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('recipe_performance')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-recipe_performance" class="form-control" name="row[recipe_performance]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Head_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-head_id" data-rule="required" data-source="auth/admin/index" data-field="nickname" class="form-control selectpage" name="row[head_id]" type="text" value="">
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Kettle_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-kettle_id" data-rule="required" data-source="kettle/index" class="form-control selectpage" name="row[kettle_id]" type="text" value="">
        </div>
    </div> -->
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ingredient_details')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="help-block" style="margin-bottom: 10px; color: #666;overflow: hidden;">
                <div style="float: left;width: 50%;text-align: center;padding-right: 15px;">配料名</div>
                <div style="float: left;width: 50%;text-align: center;padding-left: 15px;">数量</div>
            </div>
            <div id="ingredient-container">
                <div class="row ingredient-row">
                    <div class="col-xs-12 col-sm-5">
                        <input data-rule="required" data-source="clothmaking_raw/getRawInfo" data-field="name" class="form-control selectpage" name="row[ingredients][0][id]" type="text" value="">
                    </div>
                    <div class="col-xs-12 col-sm-5">
                        <input data-rule="required" class="form-control" name="row[ingredients][0][quantity]" type="number" value="" min="0" step="0.01">
                    </div>
                    <div class="col-xs-12 col-sm-2">
                        <button type="button" class="btn btn-success btn-sm add-ingredient-btn">
                            <i class="fa fa-plus"></i> 添加
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
